ReceiveHeadersCallback

The callback is invoked when the response headers have been received for a URL request.

The callback can be used to add, modify, or remove the HTTP headers received over the network.

Use the override method to override the response headers.

Use the proceed method if you do not need to modify the headers.

If the callback throws an exception, the proceed method will be invoked.

Types

Link copied to clipboard
interface Params
The parameters of the ReceiveHeadersCallback.
Link copied to clipboard
interface Response
A response for ReceiveHeadersCallback.

Functions

Link copied to clipboard
@CheckForNull
abstract fun on(params: P): R
Invoked when the callback needs a response of type R that may be determined based on the provided callback parameters.